package com.frxuexi.lib_base.http

import com.frxuexi.lib_base.entity.CommentBean
import com.frxuexi.lib_base.entity.CommentBeanItem
import com.frxuexi.lib_base.entity.FocuseBean
import com.frxuexi.lib_base.entity.LoginBean
import com.frxuexi.lib_base.entity.MyVideoBean
import com.frxuexi.lib_base.entity.MyVideoCommentBean
import com.frxuexi.lib_base.entity.ProductBean
import com.frxuexi.lib_base.entity.Res
import com.frxuexi.lib_base.entity.UserBean
import com.frxuexi.lib_base.entity.VideoBean
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface VideoApiService {

    //7015

    @GET("/videosimple/getRecommendSimpleVideo")
    suspend fun getVideos(@Query("page")page:Int,@Query("pagesize")pagesize:Int):Res<VideoBean>

    @GET("/comment/getCommentByUserId?datatype=0")
    suspend fun getComments(@Query("itemid")itemid:String):Res<CommentBean>

    @POST("/comment/publishComment")
    suspend fun addComment(@Body body: RequestBody):Res<CommentBeanItem>

    @GET("/focuse/getFocusedById")
    suspend fun getFocuse(@Query("focusID")focusID:Int):Res<FocuseBean>

    //7012
    @GET("/video/findVideos")
    suspend fun getMyVideos(@Query("currentPage")currentPage:Int,@Query("pageSize")pageSize:Int):Res<MyVideoBean>

    @POST("/fav/love")
    suspend fun addLove(@Query("videoId")videoId:Int):Res<String>

    @POST("/fav/nolove")
    suspend fun cancelLove(@Query("videoId")videoId:Int):Res<String>

    @GET("/comment/getCommentByVideoId")
    suspend fun getMyComments(@Query("videoId")videoId:Int):Res<MyVideoCommentBean>

    @GET("/comment/getChildCommentByVideoId")
    suspend fun getMyTwoComments(@Query("currentPage")currentPage:Int,@Query("pageSize")pageSize:Int,@Query("rootId")rootId:Int,@Query("videoId")videoId:Int):Res<MyVideoCommentBean>

    @POST("/comment/comment")
    suspend fun addMyComment(@Body body: RequestBody):Res<MyVideoCommentBean>

    @POST("/comment/childComment")
    suspend fun huiComment(@Body body: RequestBody):Res<MyVideoCommentBean>

    @POST("/guanzhu/guanzhu")
    suspend fun addGuan(@Body body: RequestBody):Res<String>

    @POST("/guanzhu/noguanzhu")
    suspend fun cancelGuan(@Body body: RequestBody):Res<String>
}